/* ****************************************************************
   ****************************************************************
   * Com++ Professional (c) 2009 C++ World
   * http://www.cplusplusworld.com/ mailto:compp@cplusplusworld.com
   ****************************************************************
   ****************************************************************
*/


#ifndef  _PROCESSH
#define _PROCESSH

#include <string>

namespace compp {

class Process {

private:

protected:
  std::string Name;

  int Pid;
  bool Suspended;
  bool TerminateInDestructor;

public:

  Process(std::string n) ;
  Process() ;
  virtual ~Process() ;
  void SetAutoTerm ( bool yesno ) ;
  void SetName( std::string n);
  bool GetName( std::string &n) const;
  bool GetPid ( int &p ) const;
  int  GetPid ( ) const;
  bool SendSignal ( int signo) ;
  bool Suspend();
  bool Continue();
  bool Terminate();
  bool TerminateGroup();
  bool GracefulTerminate();
  int  Wait ();
  bool IsRunning();

};
}

#endif
